<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019\6\12 0012
 * Time: 21:51
 */

namespace BigVideo\IMooc\Database;

class Mysqli implements IDatabase
{
    protected $conn;
    public function connect($host, $user, $passwd, $dbname)
    {
        $this->conn = mysqli_connect($host,$user,$passwd,$dbname);
    }

    public function query($sql)
    {
        return mysqli_query($this->conn,$sql);
    }

    public function close()
    {
        mysqli_close($this->conn);
    }
}












